import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/workTask/page',
    method: 'get',
    params: query
  })
}
export function fetchSList(query) {
  return request({
    url: '/workTask/spage',
    method: 'get',
    params: query
  })
}
export function getObj(id) {
  return request({
    url: '/workTask/' + id,
    method: 'get'
  })
}

export function addObj(obj) {
  return request({
    url: '/workTask',
    method: 'post',
    data: obj
  })
}

export function putObj(obj) {
  return request({
    url: '/workTask',
    method: 'put',
    data: obj
  })
}

export function delObj(id) {
  return request({
    url: '/workTask/' + id,
    method: 'delete'
  })
}

export function getItem(query) {
  return request({
    url: '/workTask/getItem',
    method: 'get',
    params: query
  })
}

export function taskListQuestion(query) {
  return request({
    url: '/workTask/list',
    method: 'get',
    params: query
  })
}

export function submitQuestion(obj) {
  return request({
    url: '/workTask/submit',
    method: 'post',
    data: obj
  })
}

export function readePage(query) {
  return request({
    url: '/workTask/readePage',
    method: 'get',
    params: query
  })
}

export function autoReadeQuestion(query) {
  return request({
    url: '/workTask/autoReade',
    method: 'get',
    params: query
  })
}

export function submitScore(obj) {
  return request({
    url: '/workTask/submitScore',
    method: 'post',
    data: obj
  })
}
